<template>
    <div>
      <div>
        <!-- <span>{{item}}</span>
       <input type="checkbox" v-for="item in arr" :key="item.i"> -->
  <input type="checkbox" value="科幻" v-model="hobby">科幻
  <input type="checkbox" value="喜剧" v-model="hobby">喜剧
  <input type="checkbox" value="动漫" v-model="hobby">动漫
  <input type="checkbox" value="冒险" v-model="hobby">冒险
  <input type="checkbox" value="科技" v-model="hobby">科技
  <input type="checkbox" value="军事" v-model="hobby">军事
  <input type="checkbox" value="娱乐" v-model="hobby">娱乐
  <input type="checkbox" value="奇闻" v-model="hobby">奇闻
      </div>
      <div>
        <ul>
          <li v-for="(item,index) in hobby" :key="index">
          <span>{{index}}</span><span>{{item}}</span>
          </li>
        </ul>
      </div>
    </div>
  </template>
  
  <script>
  export default {
  data(){
    return{
  arr:["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
  hobby:[]
    }
  }
  }
  </script>
  
  <style>
  
  </style>